package demo0910;

class Mysingle {
    private volatile static Mysingle mysingle = null;
    public static Mysingle getMysingle() {
        if (mysingle == null) {
            synchronized (Mysingle.class) {
                if (mysingle == null) {
                    mysingle = new Mysingle();
                }
            }
        }
        return mysingle;
    }
    private Mysingle() {};
}

public class T1_2_0520 {
    public static void main(String[] args) {

    }
}
